<%@ page import="com.po.Envelope" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    List<Envelope> envelopes = (List<Envelope>) request.getAttribute("envelopes");
%>
<div style="text-align: center">
    <h3>您的搜索如下</h3>
</div>
<table>
    <tr>
        <td><h3>信封名字</h3></td>
        <td><h3>信封拥有者</h3></td>
        <td><h3>创建时间</h3></td>
    </tr>
    <%
        for (Envelope envelope : envelopes) {
    %>
    <tr>
        <td><%=envelope.getName()%>
        </td>
        <td><%=envelope.getUser_name()%><%=envelope.getUser_sex()%>
        </td>
        <td><%=envelope.getCreate_time()%>
        </td>
        <td>
            <button onclick="window.location.href='<%=request.getContextPath()%>/tourist/selectNote?envelope_id=<%=envelope.getEnvelope_id()%>&envelope_name=<%=envelope.getName()%>'">
                查看信封内的内容
            </button>
        </td>
    </tr>
</table>
<%
    }
%>

<style>
    table {
        width: 500px;
        margin: auto;
        border: pink 1px solid;
        border-spacing: 0;
        border-collapse: collapse;
    }

    td {
        border: pink 1px solid;
    }

    body {
        background-image: url("../picture/new.jpg");
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center center;
        background-size: 100% 100%;
    }
</style>
